export default function ({
  xData = ['2023-05', '2023-06', '2023-07', '2023-08', '2023-09', '2023-10'],
  yData1 = [502.84, 205.97, 332.79, 281.55, 398.35, 214.02],
  yData2 = [281.55, 398.35, 214.02, 179.55, 289.57, 356.14],
} = {}) {
  return {
    backgroundColor: 'transparent',
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        lineStyle: {
          color: {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [
              {
                offset: 0,
                color: 'rgba(0, 255, 233,0)',
              },
              {
                offset: 0.5,
                color: 'rgba(255, 255, 255,1)',
              },
              {
                offset: 1,
                color: 'rgba(0, 255, 233,0)',
              },
            ],
            global: false,
          },
        },
      },
    },
    title: {
      top: 20,
      left: '5%',
      text: '万吨',
      textStyle: {
        fontSize: 14,
        fontWeight: 500,
        color: '#fff',
      },
    },
    grid: {
      top: '20%',
      left: '10%',
      right: 30,
      bottom: 20,
    },
    legend: {
      left: 0,
      top: 0,
      textStyle: {
        color: '#fff',
      },
    },
    xAxis: [
      {
        type: 'category',
        axisLine: {
          show: true,
        },
        splitArea: {
          // show: true,
          color: '#f00',
          lineStyle: {
            color: '#f00',
          },
        },
        axisLabel: {
          color: '#fff',
          fontSize: 14,
        },
        splitLine: {
          show: false,
        },
        boundaryGap: false,
        data: xData,
      },
    ],
    yAxis: [
      {
        type: 'value',
        min: 0,
        splitLine: {
          show: true,
          lineStyle: {
            color: 'rgba(255,255,255,0.1)',
          },
        },
        axisLine: {
          show: false,
        },
        axisLabel: {
          show: true,
          margin: 20,
          fontSize: 14,
          textStyle: {
            color: '#d1e6eb',
          },
        },
        axisTick: {
          show: false,
        },
      },
    ],
    series: [
      {
        name: '订单量(万吨)',
        type: 'line',
        smooth: true,
        showAllSymbol: true,
        symbol: 'circle',
        symbolSize: 5,
        lineStyle: {
          color: '#21D5FC',
        },
        label: {
          show: false,
          position: 'top',
          textStyle: {
            color: '#6c50f3',
          },
        },
        itemStyle: {
          color: '#21D5FC',
        },
        data: yData1,
      },
      {
        name: '出库量(万吨)',
        type: 'line',
        smooth: true,
        showAllSymbol: true,
        symbol: 'circle',
        symbolSize: 5,
        lineStyle: {
          color: '#57FFAA',
        },
        label: {
          show: false,
          position: 'top',
          textStyle: {
            color: '#00ca95',
          },
        },
        itemStyle: {
          color: '#57FFAA',
        },
        data: yData2,
      },
    ],
  };
}
